package com.luckyframe.project.jmeter.jmeterTestPlan.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.luckyframe.framework.web.domain.BaseEntity;
import com.luckyframe.project.jmeter.jmeterTestCase.domain.JmeterTestCase;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;
import java.util.List;

/**
 * jmx测试计划表 jmeter_test_plan
 * 
 * @author lancelot
 * @date 2020-10-26
 */
public class JmeterTestPlan extends BaseEntity
{
	private static final long serialVersionUID = 1L;
	
	/** id */
	private Long id;
	/** 名称 */
	private String name;
	/** 项目id 关联sys_project */
	private Integer relProjectId;
	/** 项目name 关联sys_project */
	private String relProjectName;
	/** 0 未设置执行策略 1 指定时间执行 2 按照cron表达式执行 */
	private Integer jobType;
	/** job_type=1时指定时间执行 的设定时间 */

	@JsonFormat( pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	private Date scheduledTime;
	/** 负责人名称 */
	private String dutyPersonName;
	/** cron表达式 */
	private String cronExpr;
	/** 测试场景：基准测试 负载测试 压力测试 容量测试 */
	private String scenario;
	/** 测试目的 */
	private String testPurpose;
	/** 模块id */
	private Long relModuleId;
	/** 模块名称 */
	private String relModuleName;
	/** 接口名称 */
	private String interfaceName;
	/** 修改时间 */
	private Date modifyTime;
	/** 创建者 */
	private String createBy;
	/** 创建时间 */
	private Date createTime;
	/** 更新者 */
	private String updateBy;
	/** 修改时间 */
	private Date updateTime;
	/** 备注 */
	private String remark;

	private String date;

	private String cronJobStatus;



	public String getCronJobStatus() {
		return cronJobStatus;
	}

	public void setCronJobStatus(String cronJobStatus) {
		this.cronJobStatus = cronJobStatus;
	}

	/**
	 * 测试用例列表
	 */
	private List<Long> relCaseIdList;

	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	private List<JmeterTestCase> relTestCaseDtoList;


	public List<JmeterTestCase> getRelTestCaseDtoList() {
		return relTestCaseDtoList;
	}

	public void setRelTestCaseDtoList(List<JmeterTestCase> relTestCaseDtoList) {
		this.relTestCaseDtoList = relTestCaseDtoList;
	}

	public List<Long> getRelCaseIdList() {
		return relCaseIdList;
	}

	public void setRelCaseIdList(List<Long> relCaseIdList) {
		this.relCaseIdList = relCaseIdList;
	}

	public void setId(Long id)
	{
		this.id = id;
	}

	public Long getId() 
	{
		return id;
	}
	public void setName(String name) 
	{
		this.name = name;
	}

	public String getName() 
	{
		return name;
	}
	public void setRelProjectId(Integer relProjectId) 
	{
		this.relProjectId = relProjectId;
	}

	public Integer getRelProjectId() 
	{
		return relProjectId;
	}
	public void setRelProjectName(String relProjectName) 
	{
		this.relProjectName = relProjectName;
	}

	public String getRelProjectName() 
	{
		return relProjectName;
	}
	public void setJobType(Integer jobType) 
	{
		this.jobType = jobType;
	}

	public Integer getJobType() 
	{
		return jobType;
	}
	public void setScheduledTime(Date scheduledTime) 
	{
		this.scheduledTime = scheduledTime;
	}

	public Date getScheduledTime() 
	{
		return scheduledTime;
	}
	public void setDutyPersonName(String dutyPersonName) 
	{
		this.dutyPersonName = dutyPersonName;
	}

	public String getDutyPersonName() 
	{
		return dutyPersonName;
	}
	public void setCronExpr(String cronExpr) 
	{
		this.cronExpr = cronExpr;
	}

	public String getCronExpr() 
	{
		return cronExpr;
	}
	public void setScenario(String scenario) 
	{
		this.scenario = scenario;
	}

	public String getScenario() 
	{
		return scenario;
	}
	public void setTestPurpose(String testPurpose) 
	{
		this.testPurpose = testPurpose;
	}

	public String getTestPurpose() 
	{
		return testPurpose;
	}
	public void setRelModuleId(Long relModuleId) 
	{
		this.relModuleId = relModuleId;
	}

	public Long getRelModuleId() 
	{
		return relModuleId;
	}
	public void setRelModuleName(String relModuleName) 
	{
		this.relModuleName = relModuleName;
	}

	public String getRelModuleName() 
	{
		return relModuleName;
	}
	public void setInterfaceName(String interfaceName) 
	{
		this.interfaceName = interfaceName;
	}

	public String getInterfaceName() 
	{
		return interfaceName;
	}
	public void setModifyTime(Date modifyTime) 
	{
		this.modifyTime = modifyTime;
	}

	public Date getModifyTime() 
	{
		return modifyTime;
	}
	public void setCreateBy(String createBy) 
	{
		this.createBy = createBy;
	}

	public String getCreateBy() 
	{
		return createBy;
	}
	public void setCreateTime(Date createTime) 
	{
		this.createTime = createTime;
	}

	public Date getCreateTime() 
	{
		return createTime;
	}
	public void setUpdateBy(String updateBy) 
	{
		this.updateBy = updateBy;
	}

	public String getUpdateBy() 
	{
		return updateBy;
	}
	public void setUpdateTime(Date updateTime) 
	{
		this.updateTime = updateTime;
	}

	public Date getUpdateTime() 
	{
		return updateTime;
	}
	public void setRemark(String remark) 
	{
		this.remark = remark;
	}

	public String getRemark() 
	{
		return remark;
	}

    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("relProjectId", getRelProjectId())
            .append("relProjectName", getRelProjectName())
            .append("jobType", getJobType())
            .append("scheduledTime", getScheduledTime())
            .append("dutyPersonName", getDutyPersonName())
            .append("cronExpr", getCronExpr())
            .append("scenario", getScenario())
            .append("testPurpose", getTestPurpose())
            .append("relModuleId", getRelModuleId())
            .append("relModuleName", getRelModuleName())
            .append("interfaceName", getInterfaceName())
            .append("modifyTime", getModifyTime())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .toString();
    }
}
